package de.fhaugsburg.games.boardgames.connect4.application;


import de.fhaugsburg.games.boardgames.connect4.Connect4Board;
import de.fhaugsburg.games.boardgames.connect4.Connect4Engine;
import de.fhaugsburg.games.boardgames.connect4.IGuiMessage;
import de.fhaugsburg.games.boardgames.connect4.consoleui.BoardView;
import de.fhaugsburg.games.boardgames.connect4.consoleui.CommandProcessor;


public class Connect4Launcher {

	public static void main(String[] args) {
		
		Connect4Board gameBoard = new Connect4Board(7, 6);
		BoardView gameView = new BoardView(gameBoard);
		
		Connect4Engine gameEngine = new Connect4Engine(gameBoard);
		CommandProcessor gameProcess =  new CommandProcessor(gameEngine, gameView);

		
		//register reference to user interface for engine to interact
		gameEngine.registerGui((IGuiMessage) gameProcess);
		
		gameProcess.process();			//run the game
	}
}